<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/commonforback.jsp"%>
<s:bean name="edu.isquen.core.datasource.action.DataSourceHelper" id="dsHelper"></s:bean>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Form Content</title>
<link rel="stylesheet" href="<o:Url value="/resource/css/back/main.css" />" style="text/css" media="all" />
<script type="text/javascript" src="./formeditor/fckeditor.js"></script>
<script type="text/javascript">
	function ExecuteCommand( commandName ){
		var oEditor = FCKeditorAPI.GetInstance('valObj.templatecontext') ;
		oEditor.Commands.GetCommand( commandName ).Execute() ;
	}
</script>
</head>

<body>
<form action="<s:url value='/core/form/save.action' />"
	id="contentform" name="contentform" method="post">
<div id="contentAct">
	<input name="Submit" type="submit" value="保存">
	<input name="reset" type="reset" value="返回">
</div>
<div id="contentDiv">
	<%@ include file="/common/actionMsg.jsp"%>
	<input type="hidden" name="valObj.id" value="<s:property value='valObj.id' />" />
	<input type="hidden" name='formid' id='formid' value="<s:property value='valObj.id' />"/>
	<table id="contentTable" width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td>表单名称：</td>
			<td>描述：</td>
		</tr>
		<tr>
			<td><input class="contentfield" id="name"
					name="valObj.name" type="text"
					value="<s:property value='valObj.name' />"></td>
			<td><input class="contentfield" id="description"
					name="valObj.description" type="text"
					value="<s:property value='valObj.description' />"></td>
		</tr>
		<tr>
			<td>相关数据源：</td>
			<td></td>
		</tr>
		<tr>
			<td><s:select cssClass="contentfield" name="valObj.dataSourceId" theme="simple" 
					list="#dsHelper.getDataSourceList()" value='<s:property value="valObj.dataSourceId"/>' onchange="" ></s:select></td>
			<td></td>
		</tr>
		<tr>
			<td>模板定制：</td>
			<td></td>
		</tr>
		<tr>
			<td colspan="2" style="padding-right: 10px;">
				<textarea id="templatecontext" name="valObj.templatecontext"><s:property value="valObj.templatecontext"/></textarea> 
				<script type="text/javascript">
					var sBasePath = '<o:Url value="/core/form/formeditor/" />';
					var oFCKeditor = new FCKeditor("valObj.templatecontext");
					oFCKeditor.BasePath	= sBasePath;
					oFCKeditor.Height	= "340";
					oFCKeditor.ReplaceTextarea();
				</script>
			</td>
		</tr>
	</table>
</div>
</form>
</body>
</html>
